//
//  PKReadingTableViewCell.m
//  PianKe
//
//  Created by mingtao on 15/10/12.
//  Copyright (c) 2015年 mingtao. All rights reserved.
//

#import "PKReadingTableViewCell.h"
#import <UIImageView+WebCache.h>

@implementation PKReadingTableViewCell



-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _labletitle = [[UILabel alloc]initWithFrame:CGRectMake(10, 15, WIHES, 30)];
        
        _labletitle.font = [UIFont systemFontOfSize:20];
        
        [self.contentView addSubview:_labletitle];
        
        
        
        _imagecoverimg = [[UIImageView alloc]init];
        
        _imagecoverimg.frame=CGRectMake(10, 45, 150, 80);
        
        [self.contentView addSubview:_imagecoverimg];
        
        _lablename = [[UILabel alloc]initWithFrame:CGRectMake(170, 65, WIHES-190, 30)];
        
        [self.contentView addSubview:_lablename];
        
        
    }
    return self;
}

-(void)setListPP:(PKRadingListModel *)listPP
{

    _listPP = listPP;
    _labletitle.text = listPP.title;
    
    [_imagecoverimg sd_setImageWithURL:[NSURL URLWithString:listPP.coverimg] placeholderImage:[UIImage imageNamed:@"iconfont-bofang-1"]];


    
  
    
    _lablename.text = listPP.name;

}

















- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
